iOS build failing to deploy

Priority: High
Request: Developer is trying to deploy mobile app on platform for 16548 . IOS build is failing.
App ID:16548

Side Note: Developer can’t seem to be able to access discuss.crowdbotics.com from his iOS device. Error code 403, saying they don’t have access to this app.

CC: Gaurav Passi

Android error:

> Task :app:transformDexArchiveWithExternalLibsDexMergerForRelease FAILED
D8: Cannot fit requested classes in a single dex file (# methods: 68672 > 65536)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForRelease'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  The number of method references in a .dex file cannot exceed 64K.
  Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

iOS errors:

▸ Building library libFBSDKCoreKit.a
▸ Running script 'Copy generated compatibility header'
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'GTMAppAuth' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'nanopb' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'RNScreens' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'react-native-image-picker' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'GTMSessionFetcher' from project 'Pods')
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal x86_64
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
	CompileSwift normal i386
	CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(4 failures)

@here any updates ? I still can’t build on platform .

Hi @gaurav.passi, the build logs are pasted above as an aid to helping you debug your build issue.

thats a little bit tough to debug without signed apk by yourself. It feels like you might want to update dependencies

For Android:
Make sure to enable multidex in your app/build.gradle configuration

For iOS:
Open the project in Xcode (via the .xworkspace file) and try to adjust the version targets

It is still failing after fixing the issue mentioned in last logs . Now following are the logs coming across . Please help !
@saif.murtaza
Aug 12 08:17:33 app/api Build started by user pm@crowdbotics.com

Aug 12 08:20:38 app/api Deployed web (b1b4d90dc879), release (b1b4d90dc879) by user pm@crowdbotics.com

1 Like

It’s still the same error as before.

▸ Building library libFBSDKCoreKit.a
▸ Running script 'Copy generated compatibility header'
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'nanopb' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'react-native-image-picker' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'GTMSessionFetcher' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'GTMAppAuth' from project 'Pods')
    The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.1.99. (in target 'RNScreens' from project 'Pods')
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal x86_64
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
	CompileSwift normal i386
	CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
(4 failures)

@Crowdbotics_Dan I have tried every possible way to debug but it is building locally just fine when I am trying to deploy on crowdbotics platform it gives the error . For few seconds it shows success then automatically it changes to build failure . I have also tried to archive locally and it works just fine .

Need help to debug on the platform what exactly is wrong .
@saif.murtaza

Btw - android build is successfully deployed .

Hey CB team, any updates in regards to this issue?

Hi @gaurav.passi, @saif.murtaza

I tried to compile the project in local, but there is error below.

:
:x: error: /Users/tanduong/dtdit/crowdbotics-scaffolds/repo/oromic-16548/ios/Pods/Target Support Files/Pods-oromic_16548Tests/Pods-oromic_16548Tests.debug.xcconfig: unable to open file (in target “oromic_16548Tests” in project “oromic_16548”) (in target ‘oromic_16548Tests’ from project ‘oromic_16548’)
:x: error: /Users/tanduong/dtdit/crowdbotics-scaffolds/repo/oromic-16548/ios/Pods/Target Support Files/Pods-oromic_16548/Pods-oromic_16548.debug.xcconfig: unable to open file (in target “oromic_16548” in project “oromic_16548”) (in target ‘oromic_16548’ from project ‘oromic_16548’)

Could you please make sure ios project file changes committed to git repo? (please try clone the git in another location and compile on your own local)

@gaurav.passi if you can’t modify it via XCode, try to create a post install hook within your Podfile and set the target build config settings of IPHONEOS_DEPLOYMENT_TARGET value to 8.0 or any version you need

example from StackOverflow

post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
end

@MichaelSamonte I have tried the way you mentioned. It updated Target to 9.0 but build on platform still failed. When I tried archiving locally, it works. Any idea?

@gaurav.passi I just pulled your latest commit 7hrs ago, but I still got same compiled error. please review and commit all changes in xcode project on your local to master branch, so we can help you further

I have made sure that changes are in git master . tried to deploy. On Dashboard it says Success but on activity it says IOS build failed. Is it possible to do a live session to resolve this issue? It is dragging alot. Your help will be much appreciated.

Hi Gaurav,

We just put some changes live that show mobile build error logs. If you deploy again you should get the log under App Activity.

@Crowdbotics_Dan Let me check

@Crowdbotics_Dan I have checked the logs and dashboard. Firstly it is not matching with the status showing on dashboard. Secondly in the logs i have not seen any error related to Targets. Can we schedule a quick call or live chat to resolve this?

It looks like the statuses at the top are not automatically updating. They work correctly after the page is reloaded. I will put in a bug ticket for this.

The log does show the error. I’m personally not familiar enough with mobile development to assist in solving the problem. I will see if I can get someone who knows iOS better to assist.

@gaurav.passi the code failed with the below build command which is running on circleCI, you may run on your local to check

xcodebuild(
configuration: “Release”,
sdk: “iphonesimulator”,

)