Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty with manual integration #8

Closed
ashottonoyan opened this issue Jan 25, 2016 · 23 comments
Closed

Difficulty with manual integration #8

ashottonoyan opened this issue Jan 25, 2016 · 23 comments
Labels

Comments

@ashottonoyan
Copy link

App with Uber SDK won't compile.

@faarwa
Copy link
Contributor

faarwa commented Jan 25, 2016

Would you mind sharing your compilation error? Are you running pod install and opening the .xcworkspace project file for the respective examples?

@ashottonoyan
Copy link
Author

No, I just downloaded the zip file, opened the Obj-C example and it would not run. The SDK was not linked, which I did myself, but when trying to run, the app is not able to get the images from the .bundle file.

@ashottonoyan
Copy link
Author

The manual integration does not work either.

@faarwa
Copy link
Contributor

faarwa commented Jan 25, 2016

Here are the steps I'm taking to run the Obj-C example app:

  1. Download rides-ios-sdk.zip and unzip folder.
  2. Go to examples/Obj-C SDK/.
  3. Run pod install - this installs the UberRides dependency (requires Cocoapods https://cocoapods.org/)
  4. Open Obj-C SDK.xcworkspace (running in Obj-C SDK.xcodeproj will not work)
  5. Run.

If you've tried the above steps and they did not work, please copy and paste your compilation error here.

@ashottonoyan
Copy link
Author

With pod install it worked. After adding it as Embedded Binary worked in my project too.

@faarwa faarwa closed this as completed Jan 25, 2016
@ashottonoyan
Copy link
Author

fatal error: unexpectedly found nil while unwrapping an Optional value

#1  0x0000000100e8f04c in RequestButton.(getImage in _1BC843BE53C9D0EAD7BBE45C42A0713E)(String) -> UIImage at /Users/ashottonoyan/Workspace/xcode/rad_ios/RAD/RAD/Vendor/Uber/UberRides/RequestButton.swift:165

@ashottonoyan
Copy link
Author

It can't find the bundle. It works when I copy the file from the bundle to the project.

@faarwa faarwa reopened this Jan 25, 2016
@faarwa
Copy link
Contributor

faarwa commented Jan 25, 2016

If you look under Pods/UberRides/Resources in the Pods project, do you see a Media.xcassets folder containing a 'Badge' asset (without copying the file from the bundle)?

@ashottonoyan
Copy link
Author

I'm not using Cocoa Pods, just manual integration.

@faarwa
Copy link
Contributor

faarwa commented Jan 25, 2016

Ah, I see the issue. Thanks for reporting!

@ashottonoyan ashottonoyan changed the title Did you guys try to run you examples? Did you guys try to run your examples? Jan 25, 2016
@ashottonoyan
Copy link
Author

Dyld Message: Library not loaded: @rpath/UberRides.framework/UberRides

When doing distribution build, even my workaround didn't help.

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

Is this error occurring when you run Product -> Archive?

@ashottonoyan
Copy link
Author

No, archiving and sending out beta build worked, but as soon as people launched the app, it was crashing. Then I checked with Xcode -> Window -> Devices console and was getting this message every time I try to launch and get it crashed.

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

There's a flag under Build Settings > Build Options called "Embedded Content Contains Swift Code". Is this set to Yes (for both debug and release)?

@ashottonoyan
Copy link
Author

Yes.
screenshot 2016-01-26 19 48 51

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

I'm trying to repro the issue you're running into. Is this export for Ad Hoc Deployment?

@ashottonoyan
Copy link
Author

Enterprise In house. Can it be because of that?

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

I found this article relating to the error you're receiving for enterprise builds: https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/.
Take a look and see if the errors they had are similar to yours. It seems they solved their issue through creating a new certificate and provisioning profile.

From an Apple Technical Q&A: "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run." (https://developer.apple.com/library/ios/qa/qa1886/_index.html).

Let me know if you have any luck with this!

@ashottonoyan
Copy link
Author

Still, why do I have to move out the resources from the bundle in order to make it work even as debug build?

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

The resources for the manual integration is an issue I'm working to resolve, and there will be a fix available soon that doesn't require your workaround.

I don't believe the enterprise build issue is related to this, however, so this may be something on your development/distribution account. Please let me know if you have reason to believe otherwise!

@ashottonoyan
Copy link
Author

I'm about to test with new certificate/provisioning profile. Will keep you posted.

@ashottonoyan
Copy link
Author

With new certificate/provisioning profile it did work! Thanks for your support!

@faarwa
Copy link
Contributor

faarwa commented Jan 26, 2016

Glad you got that sorted out! A fix for the resources issue will be pushed to Github soon.

@faarwa faarwa changed the title Did you guys try to run your examples? Difficulty with manual integration Jan 27, 2016
@faarwa faarwa closed this as completed in e5e0961 Jan 27, 2016
@faarwa faarwa added the bug label Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants