Giter Site home page Giter Site logo

Comments (158)

sambegin avatar sambegin commented on May 11, 2024 25

Just note here that the build.json file should look like this :

  "ios": {
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }

not

  "iOS": {
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }

like "mentioned" in the previous comment ;p

from cordova-ios.

jeffreyramia avatar jeffreyramia commented on May 11, 2024 22

Btw this worked for me:
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024 22

Is there any plan to support the modern build system?

Yes, in the next major version, which we're currently working on. But we don't have a timeline for release beyond something before the end of the year.

from cordova-ios.

aceoliver avatar aceoliver commented on May 11, 2024 10

@neofuture I am also encountering this after upgrading to XCode 10

from cordova-ios.

sumantasam1990 avatar sumantasam1990 commented on May 11, 2024 10

Is anyone having trouble using the --livereload flag with --buildFlag='-UseModernBuildSystem=0'? If so any ideas how to enable livereload

You should use ionic cordova run ios --l -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

neofuture avatar neofuture commented on May 11, 2024 7

is this why im getting this issue

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

is there a workaround ?

from cordova-ios.

PeterStegnar avatar PeterStegnar commented on May 11, 2024 6

If you use pure cordova ios, you can run like:

cordova run --target='iPad-Air-2' --buildFlag='-UseModernBuildSystem=0'

from cordova-ios.

btate avatar btate commented on May 11, 2024 4

Is there any plan to support the modern build system?

from cordova-ios.

kkjhamb01 avatar kkjhamb01 commented on May 11, 2024 4

SDK Version Issue - This app was built with the iOS 11.4 SDK. Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024 3

I'm not sure. I've had pretty much no time to work on anything Cordova-related since that comment, and I likely won't for at least a few months.

There are some folks working on getting updated tools releases out, so they're probably start putting together platform releases after that, but there are still several Xcode 10 issues that have not yet been investigated and fixed.

from cordova-ios.

newuser44 avatar newuser44 commented on May 11, 2024 2

Just do document what I'm seeing
Build with no command seems to just stop in the middle of it. It seems like its trying to build for some large of phonesxs default.

Build with the new command
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

Seems to build just fine and was able to push a version to the phone.

For ionic I see a build.json file. I add the following to it.

{  
"ios": {
    "debug": {
      "developmentTeam": "898989",
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    },
    "release": {
      "developmentTeam": "89989898",
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  }
}

It seems to look at the build.json, either I don't have it setup right or something because its not using the command.

Code Signing Error: Automatic signing is unable to resolve an issue with the "APP NAME" target's entitlements. Automatic signing can't add the aps-environment entitlement to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove this entitlement from your entitlements file and its associated functionality from your code.
Code Signing Error: Provisioning profile "iOS Team Provisioning Profile: com.app.dev.app" doesn't include the aps-environment entitlement.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'

I don't think that error surprise us. But not sure why adding the command to build.json file doesn't seem to work.

from cordova-ios.

andrewmcewen avatar andrewmcewen commented on May 11, 2024 2

Is anyone having trouble using the --livereload flag with --buildFlag='-UseModernBuildSystem=0'? If so any ideas how to enable livereload

from cordova-ios.

fuentes73 avatar fuentes73 commented on May 11, 2024 2

@jamesparkes I'm using Ionic too. And my app works perfectly with --buildConfig.
Maybe you can try to remove ios platform and add it again.

ionic cordova platform rm ios
ionic cordova platform add ios

from cordova-ios.

ecert avatar ecert commented on May 11, 2024 2

Hi there,
Cordova project on Xcode10 is failure for FCM because of XCode's new build system.

If you want to use Google FCM Push Notification with iOS device (Coding with Cordova / Ionic 3) try this;

Opening your cordova/ionic project in the Xcode IDE and change the build system in Workspace Settings to "Legacy Build System" (Under the File Menu)..

from cordova-ios.

rafalowski avatar rafalowski commented on May 11, 2024 2

@dpogue Thanks!!! worked for me
I am such a noob! I first tried:
ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"
without success until i realized i a missing an extra -- (dash dash)
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

tobiasmuecksch avatar tobiasmuecksch commented on May 11, 2024 2

@mmzepedab Yes I have. Apple has not rejected the app. Don't worry.

from cordova-ios.

hitigon avatar hitigon commented on May 11, 2024 1

You should probably create a new issue for that so this can be properly debugged @499978920 . Link to it here after you created the issue. Thanks.

simulators it's working fine. now.
I have not changed anything. very strange.
Thanks.

I saw the same issue, but mine didn't magically fix itself. (still trying)

from cordova-ios.

prvinuch avatar prvinuch commented on May 11, 2024 1

--buildFlag="-UseModernBuildSystem=0"
Worked for me too additionaly i need to change the build system in Workspace Settings to "Legacy Build System"

from cordova-ios.

viking2917 avatar viking2917 commented on May 11, 2024 1

@steptek @prasanna-tapzo I built using the old build system and had no problem getting my app approved last night. I suspect something else is causing an issue? I doubt that simply using the legacy build system will stop an app from getting approved?

from cordova-ios.

etiennea avatar etiennea commented on May 11, 2024 1

Such a pain to have to add --buildFlag='-UseModernBuildSystem=0' every time, can someone create a pull request to add this flag by default in a minor bump until 5.0.0

from cordova-ios.

mesqueeb avatar mesqueeb commented on May 11, 2024 1

@etiennea just add it to your build.json.

from cordova-ios.

SuperStar518 avatar SuperStar518 commented on May 11, 2024

Thanks, @dpogue
I was really wondering about the workaround. Hope to fix it soon!
Cheers

from cordova-ios.

janpio avatar janpio commented on May 11, 2024

Then open an issue please that has all available information on these failures @neofuture and @aceoliver. Thanks.

from cordova-ios.

DRneilC avatar DRneilC commented on May 11, 2024

@dpogue Thanks! The answer solved my problem.

from cordova-ios.

Birowsky avatar Birowsky commented on May 11, 2024

Is this ALL you guys needed to do? Nobody kept getting these errors?

[09:22:43]: [Transporter Error Output]: ERROR ITMS-90087: "Unsupported Architectures. The executable for TheApp.app/Frameworks/Sentry.framework contains unsupported architectures '[x86_64, i386]'."

[09:22:43]: [Transporter Error Output]: ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'TheApp.app/Frameworks/Sentry.framework/Sentry' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

[09:22:43]: [Transporter Error Output]: ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."

Edit: Sorry, I just realized these are Sentry's issues.

from cordova-ios.

tanvishah-syn avatar tanvishah-syn commented on May 11, 2024

@sambegin Thanks for the workaround. Where is this build.json file is present in the app directory structure?

from cordova-ios.

tanvishah-syn avatar tanvishah-syn commented on May 11, 2024

@jeffreyramia with the help of your answer I am able to build an app but whenever I am trying to emulate it gives me an error as "platforms/ios/build/emulator/demo APP.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova."

from cordova-ios.

tanvishah-syn avatar tanvishah-syn commented on May 11, 2024

@PeterStegnar I won't be run because info.plist not present in the /build directory.

from cordova-ios.

PeterStegnar avatar PeterStegnar commented on May 11, 2024

@PeterStegnar I won't be run because info.plist not present in the /build directory.

Yes this happen if you are using new build system. If you say to compiler to build legacy build then it is OK. All you need to do it so use:

--buildFlag='-UseModernBuildSystem=0'

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

I don't think that error surprise us. But not sure why adding the command to build.json file doesn't seem to work.

That error about code signing is unrelated to the new build system.
In your build.json you are not including the flags to use automatic provisioning, but you are also not specifying which provisioning profile to use. This probably wouldn't work in Xcode 9 either.

from cordova-ios.

newuser44 avatar newuser44 commented on May 11, 2024

Okay, so I don't have the build.json file really setup to be used. Other values would need to be in there. For now just have to use the command line.

from cordova-ios.

tanvishah-syn avatar tanvishah-syn commented on May 11, 2024

@PeterStegnar Thanks I am able to build and emulate app on ios with the help of --buildFlag='-UseModernBuildSystem=0' this flag. Does anyone have documentation link for this flag?
I have to explore it more.

from cordova-ios.

janpio avatar janpio commented on May 11, 2024

--livereload is not part of Cordova. You will probably want to ask this question over at http://forum.ionicframework.com/ or one of their repositories, possibly Ionic CLI.

from cordova-ios.

BorntraegerMarc avatar BorntraegerMarc commented on May 11, 2024

@andrewmcewen Yes: I get a lot of starting messages without the build actually starting.

from cordova-ios.

BorntraegerMarc avatar BorntraegerMarc commented on May 11, 2024

Created this ionic forum question: https://forum.ionicframework.com/t/exception-with-livereload-when-using-flag-usemodernbuildsystem/142728

from cordova-ios.

499978920 avatar 499978920 commented on May 11, 2024

when:ionic cordova run ios --emulator --buildFlag="-UseModernBuildSystem=0"

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-XS-Max, 12.0 simulator

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
logPath: /Users/Mango/desktop/app4/platforms/ios/cordova/console.log

[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?

but
console.log not exist.
app not deployed.

when:ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
app deployed to iPhone 7 Plus, and work fine

when: use Xcode 10
simulator ok
iPhone 7 Plus ok

from cordova-ios.

janpio avatar janpio commented on May 11, 2024

@499978920 Your first command is missing an -- . You need two of those before buildflag so it gets routed to cordova and not ionic.

from cordova-ios.

jrmihalick avatar jrmihalick commented on May 11, 2024

@dpogue I added the "-UseModernBuildSystem=0" flag to my build.json and that does address the problem we were having as mentioned on issue apache/cordova-cli#329 . Should we expect the UserModernBuildSystem=0 setting to also persist into the generated workspace, or is it always necessary to manually make that setting change in the Workspace Settings dialog as you have shown above?

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

Should we expect the UserModernBuildSystem=0 setting to also persist into the generated workspace, or is it always necessary to manually make that setting change in the Workspace Settings dialog as you have shown above?

If you open the project in Xcode, you must change the Workspace Settings. The command-line flags only affect the command-line builds.

from cordova-ios.

juamperuiz avatar juamperuiz commented on May 11, 2024

@dpogue Thanks for your comment, you save my time!

from cordova-ios.

499978920 avatar 499978920 commented on May 11, 2024

@499978920 Your first command is missing an --. You need two of those before buildflag so it gets routed to cordova and not ionic.

ionic cordova build ios --emulator -- --buildFlag="-UseModernBuildSystem=0"
ok
but
ionic cordova run ios --emulator --target="iPhone-XS" -- --buildFlag="-UseModernBuildSystem=0"
app not deployed
but
ionic cordova run ios --emulator --target="iPhone-7, 11.4" -- --buildFlag="-UseModernBuildSystem=0"
app deployed

some simulator ok eg: iPhone-XR
some simulator can't deployed eg: iPhone-XS iPhone-XS-Max

from cordova-ios.

janpio avatar janpio commented on May 11, 2024

You should probably create a new issue for that so this can be properly debugged @499978920 . Link to it here after you created the issue. Thanks.

from cordova-ios.

499978920 avatar 499978920 commented on May 11, 2024

You should probably create a new issue for that so this can be properly debugged @499978920 . Link to it here after you created the issue. Thanks.

simulators it's working fine. now.
I have not changed anything. very strange.
Thanks.

from cordova-ios.

v-ken avatar v-ken commented on May 11, 2024

Thanks for the workaround. I manage to build using the recommended build flag. However, I only get a blank white screen after the splash screen disappears. The app was working fine when running on Xcode 9. Was wondering if anyone else is having this issue?

I'm running on ionic.

from cordova-ios.

jamesparkes avatar jamesparkes commented on May 11, 2024

i'm having a similar issue @v-ken. i was able to build by passing --buildConfig, however, my app just stays stuck on the splash screen. it is possible some other plugins are now breaking, but don't know for sure

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

@jamesparkes Just to get a bit more info, are you using Cordova or Ionic? There has been a report of icons/splashscreens not working in Xcode 10, but other people have said it's working fine 😕

from cordova-ios.

jamesparkes avatar jamesparkes commented on May 11, 2024

hey @dpogue i'm using ionic

from cordova-ios.

jamesparkes avatar jamesparkes commented on May 11, 2024

screen shot 2018-09-27 at 12 14 18 pm
^ output from console 🍑💨

screen shot 2018-09-27 at 12 15 49 pm
^ DOM

it appears like everything is there looking at the DOM, but without anything to go by on the console output, i'm stuck in the mud.

i'm gonna try ripping out plugins one by one to see if something is possibly happening there

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

I don't think the missing splashscreens are a plugin issue. It's probably related to how/where the assets are getting copied in Xcode.

from cordova-ios.

jamesparkes avatar jamesparkes commented on May 11, 2024

hhhrrrmmm. the splashscreen itself isn't missing, it opens on the splashscreen and the splashscreen never goes away

from cordova-ios.

jamesparkes avatar jamesparkes commented on May 11, 2024

i'm good to go now, the buildConfig also worked for me. my issue was another plugin. sorry for the mishap!

from cordova-ios.

 avatar commented on May 11, 2024

ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"

worked for me, thanks!

from cordova-ios.

paulincai avatar paulincai commented on May 11, 2024

I am just wondering why I don't have this issue. I am on a "self upgrade" of Cordova versions in MeteorJS. I use [email protected] and [email protected] and I haven't had any problems from my first xcode build with xCode 10. Actually I came into this page because there is an announcement on Cordova blog not because I had any issues.

I believe Meteor is not using cordova-cli and the project is built by this file:
https://github.com/meteor/meteor/blob/devel/tools/cordova/project.js

from cordova-ios.

sgruhier avatar sgruhier commented on May 11, 2024

when I run ng run app:ionic-cordova-build --platform=ios --buildFlag="-UseModernBuildSystem=0" I have

Unknown option: '--buildFlag'

I'm using ng cli 6.2.3
Any idea?
Thanks

from cordova-ios.

499978920 avatar 499978920 commented on May 11, 2024

when I run ng run app:ionic-cordova-build --platform=ios --buildFlag="-UseModernBuildSystem=0" I have

Unknown option: '--buildFlag'

I'm using ng cli 6.2.3
Any idea?
Thanks

-- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

dominikse avatar dominikse commented on May 11, 2024

when I run ng run app:ionic-cordova-build --platform=ios --buildFlag="-UseModernBuildSystem=0" I have

Unknown option: '--buildFlag'

I'm using ng cli 6.2.3
Any idea?
Thanks

You need to change the build system in Xcode to legacy build system (see screenshots at pullet point 3 in first post).

from cordova-ios.

sgruhier avatar sgruhier commented on May 11, 2024

thanks
I did it, I can run a build in xcode but I'm curious how I can use command line like others with --buildFlag :)

from cordova-ios.

CesarBalzer avatar CesarBalzer commented on May 11, 2024

Changing the configuration in xcode to legacy did not work, setting the flag cordova build ios --buildFlag = '- UseModernBuildSystem = 0' did not work and creating the build.json file with the flags also did not work.

I downgrade the Cordova version to 7 and it works normal.
thank you Quentin Valmori

from cordova-ios.

rujinxero avatar rujinxero commented on May 11, 2024

After changing to Legacy Build System i still get this error after running:
ionic cordova run ios
error: module importing failed: ('invalid syntax', ('temp.py', 1, 27, 'import fruitstrap_00008020-000914CA3E78002E\n'))

backtrace unavailable

from cordova-ios.

rujinxero avatar rujinxero commented on May 11, 2024

sorry here are my specs

OS: Mac macOS Mojave

Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.8

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.1.4, (and 5 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/ronaldcolombo/Library/Android/sdk)
ios-deploy : 1.9.2
NodeJS : v8.9.1 (/usr/local/bin/node)
npm : 5.7.1
OS : macOS
Xcode : Xcode 10.0 Build version 10A255

from cordova-ios.

quickly79 avatar quickly79 commented on May 11, 2024

Just updated to newest xcode. This worked for me for an ionic -v1 project with the emulator and live reload and console. Hope it helps.

ionic cordova emulate ios -l -c -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

rujinxero avatar rujinxero commented on May 11, 2024

--buildFlag="-UseModernBuildSystem=0" is the same as changing the build system to Legacy Build System.. so i'm already doing that technically.. its after doing that the screen goes black after the splash screen and i get that error.

from cordova-ios.

JonahElbaz avatar JonahElbaz commented on May 11, 2024

After applying the mentioned fixes, I'm able to build ios to Xcode but as of now ALL my cordova plugins are failing to be added.
Im using ionic 3.9 and after i build to xcode with
ionic cordova build ios
and run it on my phone, every single one of my plugins fail including things like status bar.
I've done standard ionic recommended steps like removing all plugins and the ios project and adding it again, then when running cordova prepare, the plugin gets added to the android project and the browser project correctly but fail to be added to the ios project, usually because of some ios version error or cocoa pods issue.

For example with cordova-plugin-webview
"apple-ios version check failed ("/Users/jonahelbaz/Desktop/Gizer/GitHub/Repositories/gzr-ionic/platforms/ios/cordova/apple_ios_version")"

Any help would be greatly appreciated. If any other info is needed please ask. @dpogue

from cordova-ios.

BrettKoenig avatar BrettKoenig commented on May 11, 2024

when I run ng run app:ionic-cordova-build --platform=ios --buildFlag="-UseModernBuildSystem=0" I have

Unknown option: '--buildFlag'

I'm using ng cli 6.2.3
Any idea?
Thanks

See this issue: ionic-team/ionic-cli#3602
Try running: npm install -g ionic@latest
And then: ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

eladcandroid avatar eladcandroid commented on May 11, 2024

@BrettKoenig You're trying to send an argument to ng instead of cordova.
Put a file called build.json on your cordova folder with this content:

{
  "ios": {
    "debug": {
      "buildFlag": ["-UseModernBuildSystem=0"]
    }
  }
}

and run your command again..

from cordova-ios.

mmzepedab avatar mmzepedab commented on May 11, 2024

Has anyone tried to publish an App to the App Store with this workaround, I'm concerned Apple will reject this kind of builds. Just want to confirm before I send and update of an App I built with Xcode 9.

from cordova-ios.

niccolomineo avatar niccolomineo commented on May 11, 2024

I tried all the solutions above but to no avail. I chmodded the app folder recursively to 777 and am building the project within XCode at the moment. But it's rather slow to manage running/building like this.

from cordova-ios.

Velm14 avatar Velm14 commented on May 11, 2024

After changing to Legacy Build System i still get this error after running:
ionic cordova run ios
error: module importing failed: ('invalid syntax', ('temp.py', 1, 27, 'import fruitstrap_00008020-000914CA3E78002E\n'))

backtrace unavailable

Hi, @rujinxero . I've got the same error on iPhone XS. I think it's bug with Cordova build system, and they should update platform somehow... Or, do you get any solution for that ?

from cordova-ios.

Sroose avatar Sroose commented on May 11, 2024

Adding the legacy flag to my build.json works for the build phase. However, in the distribution phase (I use fastlane for upload to Testflight/appstore), it is not using this variable. Reason being the setting for distribution is taken from Workspace level.

My workaround is now to add a file WorkspaceSettings.xcsettings which holds (in plist format) the key-value BuildSystemType = Original. Will this issue also be cleanly fixed?

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

I am experiencing the same issue none of above suggestions has fixed. The issue that I am experiencing is the HttpClient calls getting failed as exlained here
my code is something like this....

 this.horoService.getPlan(this.device.uuid)
           .subscribe(res => {
                this.info2 = '';
                let pln: Plan = { uuid: res['uuid'], name: res['name'], credits: res['credits'], dobs: res['dobs'] };
                this.plan = pln;
                if(res['name'] == 'xxx.xxx.xxx.xxx'){
                    this.showSU = true;
                    this.showCR = false;
                    this.showASU = false;
                } else if(Number(res['credits']) == 0) {
                    this.showSU = false;
                    this.showCR = true;
                    this.showASU = false;
                } else {
                    this.showSU = true;
                    this.showCR = false;
                    this.showASU = true;
                }
            }, (err) => {
                    this.showSU = false;
                    this.showCR = false;
                    this.showASU = false;
                this.info2 = JSON.stringify(err);
            });    

the error is pointing to main.js line 676 column 15, please note the same code works just fine in Android devices.

infact I just noticed that there is no issue with communication as I could see HTTPResponse coming back correctly while tested from ionic serve whereas (err) in above .subscribe call is showing Unknown URL, Unknown error

Finally the issue is resolved after downgrading to WkWebView to UIWebView and also I missed a xCode build configuration to "Legacy Build System" as explained by @dpogue but however there are some other issues such as tapping not working in some part of SVG for which the event handler attached also like this

this['lstnr_' + id] = this.renderer.listen(svg, 'click', (event) => {
			// Do something with 'event'
			console.log('clicked ', event.path);
			console.log('clicked ', event.path[2]);
			this.navCtrl.push(ChartAnalysisPage, {ID: event.path[2].id});
		});

this code works fine in Android devices, while I tested this in iPad it failed, not sure if this is due to downgrade or some other problem as I haven't tested any other iOS before and not least first time app loading takes much more time(at least 2-3 mins) than Android devices, can't move this App to production with such wait time. And the App is not well responding to the touch events which is one more annoying thing, not sure if these are all known issues in Cordova or if there is something I miss during iOS build, please suggest!

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

If I add --prod in command line getting error without which the filesize is big & taking more time while loading the app

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024
  • ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

could not find buildFlag option in the ionic cordova link is this outdated? I am having problems with passing --prod flag your suggested way resolves the compiler issue but if I add a prod flag like below throwing compiler error could you please help

ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"`

from cordova-ios.

glmagicworks avatar glmagicworks commented on May 11, 2024

@nagthgr8 you should use:

ionic cordova build ios --prod --release -- --buildFlag="-UseModernBuildSystem=0"

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

@nagthgr8 you should use:

ionic cordova build ios --prod --release -- --buildFlag="-UseModernBuildSystem=0"

@gabriellacerda yes I am using the same it fails with below compiler error
ionic cordova build ios --release --prod – --buildFlag="-UseModernBuildSystem=0"

Below compiler error I am getting while executing above command in MAC with xCode 10

74-80-250-211:ios user913708$ [ERROR] An error occurred while running subprocess ionic-app-scripts.

-bash: [ERROR]: command not found

74-80-250-211:ios user913708$

74-80-250-211:ios user913708$ ionic-app-scripts build --prod --target cordova --platform ios exited

with exit code 1.



Re-running this command with the --verbose flag may provide more 

information.[12:36:57]  ionic-app-scripts 3.2.0 

[12:36:57] build prod started …

[12:36:57] ionic-app-script task: “build”

[12:36:57] Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’:

    ENOENT: no such file or directory, open 

    '/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json'. 

Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’: ENOENT: no such file or directory, open ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’.

at new BuildError (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)

at getTsConfig (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:313:15)

at Object. (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)

at step (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)

at Object.next (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)

at /Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:7:71

at new Promise ()

at __awaiter (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:3:12)

at Object.getTsConfigAsync (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:295:12)

at Object.validateRequiredFilesExist (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/build/util.js:89:21)
74-80-250-211:ios user913708$ with exit code 1

from cordova-ios.

glmagicworks avatar glmagicworks commented on May 11, 2024

@nagthgr8 you should use:

ionic cordova build ios --prod --release -- --buildFlag="-UseModernBuildSystem=0"

@gabriellacerda yes I am using the same it fails with below compiler error
ionic cordova build ios --release --prod – --buildFlag="-UseModernBuildSystem=0"

Below compiler error I am getting while executing above command in MAC with xCode 10

74-80-250-211:ios user913708$ [ERROR] An error occurred while running subprocess ionic-app-scripts.

-bash: [ERROR]: command not found

74-80-250-211:ios user913708$

74-80-250-211:ios user913708$ ionic-app-scripts build --prod --target cordova --platform ios exited

with exit code 1.



Re-running this command with the --verbose flag may provide more 

information.[12:36:57]  ionic-app-scripts 3.2.0 

[12:36:57] build prod started …

[12:36:57] ionic-app-script task: “build”

[12:36:57] Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’:

    ENOENT: no such file or directory, open 

    '/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json'. 

Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’: ENOENT: no such file or directory, open ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’.

at new BuildError (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)

at getTsConfig (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:313:15)

at Object. (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)

at step (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)

at Object.next (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)

at /Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:7:71

at new Promise ()

at __awaiter (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:3:12)

at Object.getTsConfigAsync (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:295:12)

at Object.validateRequiredFilesExist (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/build/util.js:89:21)
74-80-250-211:ios user913708$ with exit code 1

Ok, it seems the compiler is not finding your tsconfig.json config file, try removing the platform and adding it again:

ionic cordova platform remove ios; ionic cordova platform add ios

Then try building again...

from cordova-ios.

jasonwist avatar jasonwist commented on May 11, 2024

I've noticed that when setting keychain entitlements in Xcode it only copies to the debug.plist and not the release.plist.

Is there a build flag or setting with Cordova CLI where I can force one .plist or create a APP_NAME.entitlements file?

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

@nagthgr8 you should use:

ionic cordova build ios --prod --release -- --buildFlag="-UseModernBuildSystem=0"

@gabriellacerda yes I am using the same it fails with below compiler error
ionic cordova build ios --release --prod – --buildFlag="-UseModernBuildSystem=0"
Below compiler error I am getting while executing above command in MAC with xCode 10
74-80-250-211:ios user913708$ [ERROR] An error occurred while running subprocess ionic-app-scripts.
-bash: [ERROR]: command not found
74-80-250-211:ios user913708$
74-80-250-211:ios user913708$ ionic-app-scripts build --prod --target cordova --platform ios exited

with exit code 1.



Re-running this command with the --verbose flag may provide more 

information.[12:36:57]  ionic-app-scripts 3.2.0 

[12:36:57] build prod started …
[12:36:57] ionic-app-script task: “build”
[12:36:57] Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’:

    ENOENT: no such file or directory, open 

    '/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json'. 

Error: tsconfig: Cannot read file ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’: ENOENT: no such file or directory, open ‘/Users/user913708/vedichoroo/vedichoroo/platforms/ios/tsconfig.json’.
at new BuildError (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at getTsConfig (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:313:15)
at Object. (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)
at step (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)
at Object.next (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)
at /Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:7:71
at new Promise ()
at __awaiter (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:3:12)
at Object.getTsConfigAsync (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/transpile.js:295:12)
at Object.validateRequiredFilesExist (/Users/user913708/vedichoroo/vedichoroo/node_modules/@ionic/app-scripts/dist/build/util.js:89:21)
74-80-250-211:ios user913708$ with exit code 1

Ok, it seems the compiler is not finding your tsconfig.json config file, try removing the platform and adding it again:

ionic cordova platform remove ios; ionic cordova platform add ios

Then try building again...

@gabriellacerda I followed your instructions while add command is executed I get below response

ionic cordova platform add ios
ENDENT: no such file or directory, uv_cwd

I removed the platform without ionic prefix is that the consequene, how can I fix this now

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

@nagthgr8 @gabriellacerda Please direct Ionic-related issues to the Ionic discussion forums.

The issues and steps that affect Ionic are similar, but not the same as the ones affecting Cordova, and it's confusing to have Ionic-specific workarounds mentioned in a help issue for Cordova.

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

Ionic discussion forum seems not so active in responding I already posted there I am clueless right now if this is something I am struggling alone or is a known ionic issue.

from cordova-ios.

nagthgr8 avatar nagthgr8 commented on May 11, 2024

got response from Ionic team as below, please somebody from cordova team help, I had to stop production release due to this issue, app is loading very slow(takes about 2 mins), hoping if I could compile with --prod flag this should resolve to some extent.

Unfortunately this issue goes beyond the scope of our own support due to the issue ultimately lying with Cordova 4.X and not Ionic. Hope that provides you with some direction!

from cordova-ios.

kevin-netsrik avatar kevin-netsrik commented on May 11, 2024

After changing to Legacy Build System i still get this error after running:
ionic cordova run ios
error: module importing failed: ('invalid syntax', ('temp.py', 1, 27, 'import fruitstrap_00008020-000914CA3E78002E\n'))
backtrace unavailable

Hi, @rujinxero . I've got the same error on iPhone XS. I think it's bug with Cordova build system, and they should update platform somehow... Or, do you get any solution for that ?

I have exactly same issue to build on my iPhone XS. does someone have any idea?

from cordova-ios.

theMartux avatar theMartux commented on May 11, 2024

Hello, yesterday I uploaded my build to the App Store via Xcode.
I used the Legacy Build System and the automatic signature. Everything worked correctly.
My app has been accepted.

from cordova-ios.

ceeespinosa19 avatar ceeespinosa19 commented on May 11, 2024

@theMartux Hi! to upload your app, did you use this command? ionic cordova run ios --l -- --buildFlag="-UseModernBuildSystem=0" or can you tell me de steps did you follow? because i can't still upload a single app

from cordova-ios.

theMartux avatar theMartux commented on May 11, 2024

@ceeespinosa19 ciao.
No. I did not use Ionic. The --buildFlag = "-UseModernBuildSystem = 0" command that you use in Cordova is not required if you use the Xcode build settings. If you setting Legacy Build System in Xcode you can use the default command run in Cordova. In any case, I uploaded my app simply using the Xcode settings on the old build and the automatic signature. Xcode did the rest.

from cordova-ios.

barnesdc avatar barnesdc commented on May 11, 2024

@theMartux
I am fairly new to building Apps (like just started this past two months). Could you further explain the steps you took to build your app in Xcode using the Legacy Build System?

from cordova-ios.

theMartux avatar theMartux commented on May 11, 2024

@theMartux
I am fairly new to building Apps (like just started this past two months). Could you further explain the steps you took to build your app in Xcode using the Legacy Build System?

Ciao
It’s very simple! You should create app with the Cordova CLI command.
Next step you adding the platform iOS and follow the dpogue's steps in her first post.

from cordova-ios.

barnesdc avatar barnesdc commented on May 11, 2024

I ended up getting my app running on my iPhone X.
Steps that I took:

  • opened the ionic-ios build folder on Xcode
  • attempted build, failed.
  • resolved any cautions, literally just had to click and let Xcode do its thing.
  • Xcode -> preferences -> accounts: then log in to your developer account and "manage certificates" and add your signing cert.
  • then select views -> navigators -> show project navigator
    -- should be on a screen that shows info & build settings. on that same like, the first thing should be the name of your app, click that and then select your app in the "targets" area. this will bring up the "general" tab
  • inside the general tab, change the "bundle identifier" to the name of your developer profile and make sure your team is selected as the signing profile.
  • lastly, file -> workspace setting -> change the build setting to legacy.

After these steps the build of my app failed. On my iPhone I had to navigate to Settings -> general - device management -> and trust the signing certificate (I think that is what is was)
Rebuilt the app and everything ran successfully.

Hopefully you all can follow my steps.

from cordova-ios.

SanjanaTailor avatar SanjanaTailor commented on May 11, 2024

Thank you for me using CLI command where I used below command which worked for me well

xcodebuild clean -project /Users/xxx.xcodeproj -configuration Release -alltargets -UseModernBuildSystem = NO

from cordova-ios.

IonicOnCouch avatar IonicOnCouch commented on May 11, 2024

@nagthgr8 Did you find a solution for the problem? I have the same Error...

from cordova-ios.

prasanna-tapzo avatar prasanna-tapzo commented on May 11, 2024

When i try to upload build to App Store I am getting following error:

Invalid Bundle. The asset catalog at Assets.car' can't be processed. Rebuild your app, and all included extensions and frameworks, with the latest GM version of Xcode and resubmit." I am using Xcode 10.1.

from cordova-ios.

steptek avatar steptek commented on May 11, 2024

I do have same pb, <..latest GM version of Xcode and resubmit."> . and then I am forced to use the new build system, but unfortunately the notifications didn't work.
It's a known pb, and it's probably linked to how the new build system bundles the provision file inside the app....
if any one succeed making notifs works with the new build, please share...

from cordova-ios.

dpogue avatar dpogue commented on May 11, 2024

@steptek Even if you're using the newest version of Xcode, you're not forced to use the new build system. There are instructions in the first post about how to enable the old build system within Xcode.

from cordova-ios.

steptek avatar steptek commented on May 11, 2024

@dpogue agreed, but you wont be able to push it on apple store for review, same like they are only accepting the new build for v12.1, and I absolutely understand that they are giving backward compatibility either by command line or Xcode menu, but the end is the same, Just we will be enjoying the apps only on device and play with it or say good-bay for notification for Cordova on v12.1.
In fact the embedded.mobileprovision is missing on each build done by new build option, and that's no good for notifications, neither for moving forward and stepping to apple store review (with the legacy option)..
that's not gooooooood.....

from cordova-ios.

sesangsokuro avatar sesangsokuro commented on May 11, 2024

i use legacy build system ( both xcode config or xcodebuild option ) but app was not work, the build is success but when I run this app, app was crashed. just no error log, how to handle it?

from cordova-ios.

Velm14 avatar Velm14 commented on May 11, 2024

from cordova-ios.

sesangsokuro avatar sesangsokuro commented on May 11, 2024

from cordova-ios.

rborges79 avatar rborges79 commented on May 11, 2024

@dpogue Build failed after ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" with message:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
Referenced from: /usr/local/bin/node
Reason: image not found

My Ionic info:

Ionic:

ionic (Ionic CLI) : 4.6.0
Ionic Framework : @ionic/angular 4.0.0-beta.19
@angular-devkit/build-angular : 0.10.7
@angular-devkit/schematics : 7.0.7
@angular/cli : 7.0.7
@ionic/angular-toolkit : 1.2.0

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 5 other plugins)

System:

ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v11.5.0
npm : 6.5.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

Any suggestion?

from cordova-ios.

rborges79 avatar rborges79 commented on May 11, 2024

@dpogue Build failed after ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" with message:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
Referenced from: /usr/local/bin/node
Reason: image not found

My Ionic info:

Ionic:

ionic (Ionic CLI) : 4.6.0
Ionic Framework : @ionic/angular 4.0.0-beta.19
@angular-devkit/build-angular : 0.10.7
@angular-devkit/schematics : 7.0.7
@angular/cli : 7.0.7
@ionic/angular-toolkit : 1.2.0

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 5 other plugins)

System:

ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v11.5.0
npm : 6.5.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

Any suggestion?

Solved removing [email protected] and icu4c from brew. Then, installed and applied to use [email protected] from nvm and finally reinstalled all node_modules libs, platforms and plugins.

from cordova-ios.

ilyakamens avatar ilyakamens commented on May 11, 2024

Yes, in the next major version, which we're currently working on. But we don't have a timeline for release beyond something before the end of the year.

@dpogue - is there another timeline or target date for 5.0? Would love any info related to that. Thanks!

from cordova-ios.

mesqueeb avatar mesqueeb commented on May 11, 2024

Just for anyone with a similar problem and want to get it to work with the build.json

At first I tried what's written in the beginning of this thread, but it didn't work:
build.json

  "ios": {
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  },

Then I realised I have to add "debug" as well.

Solution:

build.json

  "ios": {
    "debug": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    },
    "release": {
      "buildFlag": [
        "-UseModernBuildSystem=0"
      ]
    }
  },

Just thought I'd leave it here for future reference.

from cordova-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.