Error after updating to Xcode 7 - xcode

I am developing mobile app with Ionic Framework and I just received very strange error that broke my whole build.
'myapp/Plugins/com.phonegap.plugins.facebookconnect/FacebookSDK.framework/FacebookSDK(FBLikeButtonBackgroundSelectedPNG.o)'
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
That happen after . It worked perfectly before upgrading to the new Xcode version 7.0. I have tried to disable the BITCODE for the project but the Facebook functionality of the APP does not work as expected.
EDIT
If I disable BITCODE for the project the Facebook plugin opens the browser instead of the app therefore Disabling BITCODE is not a solution in that case.

From Xcode 7, BitCode in enable it by default. You will get this error until all apps and frameworks in your bundle doesn't include bitcode.
to remove this warning you can disable this in Build Settings
Build Settings>All>Build Options>Enable Bitcode = NO

This is a known issue with the Facebook Plugin. There is an open ticket at https://github.com/Wizcorp/phonegap-facebook-plugin/issues/111614 - I'd suggest you keep an eye on.
As a work-around, you might try
Project > Build Settings > Build Options > Enable Bitcode = No
(found # http://forum.ionicframework.com/t/error-after-updating-to-xcode-7/32641)

I too face the same problem while updating the frameworks for giving iOS9 support.
1.To change In build settings:
Enable Bitcode = "NO"
Not only for your project targets, to set all of your targets including your pods(Project) targets.
2.Change the Build Architecure only:
Debug - YES
Relese - NO
That was fixed!

Here is what it worked for me:
I am stealing it from here :
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116
Update the plist with steps 2 and 3 from e Facebook's iOS 9 guide
Turn off the bitcode setting (you already know how to do that :smile:)

You should update your Facebook SDK. It did the trick for me as the latest Facebook SDK version supports bitcode. You don't have to upgrade to v4 as version 3.24 works perfectly.
There are a few other steps for iOS 9 compatibility like whitelisting FB domains and authorizing FB apps.
The following version support bitcode and can compile with the flag set to YES:
Version 3.24
Version 4.x
The relevant section of the FB documentation says:
Is bitcode supported?
v4.6 and v3.24 of the SDK supports bitcode. If you are using earlier versions, you must disable bitcode.
All steps required to upgrade to iOS 9 (transport security / app whitelisting) can be found here:
https://developers.facebook.com/docs/ios/ios9
But I have to tell you that even though it compiles/link OK and uses an "integrated" Facebook login dialog, it still uses a browser as a modal view in your app. For me it is a regression from the previous Facebook app integration. I don't know whether there's a way to get the old "native" login dialog back.

Related

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'

I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.
Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.
My Setup:
MacOS 10.14.2 (Mojave)
Using XCode 10.1 (10B61)
Error message:
Missing entitlement. watchOS extension
'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses
'UIBackgroundModes' value 'workout-processing' without the required
entitlement 'com.apple.developer.healthkit' signed into the bundle.
Watch Extension Capabilities:
The app is built using cordova-8.1.1 and cordova-ios-4.5.5
cordova build ios --buildFlag='-UseModernBuildSystem=0'
In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.
Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.
Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!
After following the comment below I managed to get my app to validate once again on XCode 10:
Hi #guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the
com.apple.developer.healthkit
is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.
Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628
In addition to that, I was also able to submit my app into the app store.

Bitcode is disabled in Facebook-iOS-SDK 4.37

I have updated Facebook SDK 4.37, after updating the SDK I started seeing one compile time error to disable bitcode. I can't disable bitcode because I have watch kit app which really need to have bitcode enable. If anyone faced this issue and solution, please let me know.
The error that I am seeing is here:
FBSDKShareKit.framework/FBSDKShareKit(FBSDKLikeBoxView.o)' does not
contain bitcode. You must rebuild it with bitcode enabled (Xcode
setting ENABLE_BITCODE), obtain an updated library from the vendor, or
disable bitcode for this target. file
FBSDKShareKit.framework/FBSDKShareKit' for architecture arm64
I also posted the same thing on Developers page on Facebook. They are saying this is known and trying to fix.
Finally, Facebook fixed the bug in 4.38
https://developers.facebook.com/docs/ios/change-log-4x/
I finally ended up integrating the facebook sdk without any bitcode issues. I went back and used 4.36 instead of 4.37. The download link I used is here. (I don't use cocoapods). Hopefully fb will eventually get around to releasing a stable version. But until then ill stick to 4.36.

Xcode cannot compile for older Architecture

This happens after I updated my Xcode to support iOS 11, if I set 'Build Active Architecture' to 'YES' and build for a specific device, it runs fine but if I try to set 'Build Active Architecture' to 'NO' or build for generic iOS device it will create an error 'No Such Module...'.
This is okay for testing but the main problem is that the version to upload to app store needs to support armv7 and armv7s as well.
If it affects I am using Xcode 9.0.1(no absolute reason just the latest version when I perform the update). I am using the current latest version of 9.2.
I am using Cocoapods to install external frameworks. Those that appear in the 'No such Module' error includes Alamofire, XlPagerTabStrips and ActionsheetPicker(those that I noted, may be more) they are all updated to latest version when I updated Xcode.
There is also another situation where my project cannot use Automatic codes signing, that may or may not be related but I am just going to mention it, if it hints at anything.
Update:
I have converted my project to Swift4, confirmed my cocoapods is up to date, reinstalled all the modules for Swift4. Same situation, the error claiming 'No such module...' will appear if I try to compile including older architectures.
The error will not show if I attempt to compile only for arm64 and armv7s but somehow the ipa only supports arm64.
Assuming that you got the last version of Xcode 9.1 [December 4, 2017] then, you may also first start to update CocoaPods to the last version, then follow documentation to clean remove then reinstall the last version of each module:
https://github.com/Alamofire/Alamofire
https://github.com/xmartlabs/XLPagerTabStrip
https://github.com/skywinder/ActionSheetPicker-3.0
...
Remember also that some modules will required some specifics setup to be integrated into your Xcode project using CocoaPods.

Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5

I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
I am trying to find where and how to remedy this, and I am coming up with bupkus.
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
It's pretty common!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
I just wanted to put the full answer up here to help others who have the same problem ;)
Ok...I resolved this, but I did not properly track HOW I resolved it....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
I think that's how I did it....
But, now it builds with no errors and loads onto my iPhone as expected.
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.

Installing iOS SDK 4.1 on xcode 3.2.5

I've read through a lot of posts and couldn't really figure out the answer to this question. So I apologize if I duplicating it here.
I have installed xcode 3.2.5 to my machine and it comes with SDK 4.2. My iPhone is on 4.1 and I am not planning to move it to 4.2 just yet. Problem is that I can't use this phone for testing. Since the only SDK that I have installed is 4.2, when I try to run debug with my iPhone, I get this message:
Can't install application
The info.plist for application at /blabla/app.app specifies a minimum OS of 4.2, which is too high to be installed on this device.
So, I got to Targets -> Get Info and I see that it is indeed targeting 4.2 (but that is the only option available - since I don't have the other SDK's installed).
So, the question is: how to I keep xcode 3.2.5, but install SDK 4.1 in addition to 4.2?
It took a while to figure this out.
I couldn't see 'iOS Deployment Target' on the info.plist either. Here's what I did.
a) Project -> Edit Project Settings
b) go to 'deployment' section
c) Change
'Targeted Device Family' = iPhone/iPad
'iOS Deployment Target = 'iOS 4.1'
Open up your info.plist in your project. There is a place where you can define for iOS 4.1.
Just open the previous SDK dmg, then go to Packages, and install the SDK 4.1 package.
More info : Install sdk 2.0 to 3.1 for xcode 3.2
Note : the "Packages" directory is not visible in the dmg since xcode_3.2.5_and_ios_sdk_4.2_final. Just use the Terminal (or finder "Go to folder") to open "/Volumes/Xcode and iOS SDK/Packages".
Edit : the xcode4.1 for Snow Leopard create an app called "Install Xcode.app". The packages directory is inside the app package.
The best way to do this is to find a copy of Xcode 3.2.4, with iOS 4.1, and install it in a separate directory. When you install, take the dropdown that's set to Developer and switch it to DevOld, or something similar. As there's no way to install new SDKs in the new version of Xcode, keeping multiple versions is the best you can do.
If you simply want to be able to run your app in 4.1, not necessarily develop in it, go into your target's settings, and under the build tab, set the iOS Deployment Target key to 4.1 or below.
Good luck!
What you need to do is:
In the BUILD section of the Project info click on Show and change its value from Setting defined at this level to All Settings.
In the updated list of settings you will surely locate the desired one.
Good Luck!

Resources