TeamCity not building Cordova project when building PhoneGap project - xcode

I'm trying to build a PhoneGap application using TeamCity and am receiving an error stating that:
AppDelegate.h:30:9: fatal error: 'Cordova/CDVViewController.h' file not found
My xcodeproj actually has the Cordova.xcodeproj file inside the project rather than referencing it from anywhere else. I can tell it is in fact building the project as when I deliberately put in a syntax error into one of its files the build fails on that file, however it doesn't seem like the compiled output is being picked up by the main project.
I can build the project fine through xcode.
Thanks,
Matt

Related

XCODE 13.2: Multiple commands produce Build Error

I am trying to build a project using Google FireStore.
I was able to compile fine yesterday. I had the auth working.
I added a couple swift files today and I keep getting this build error.
Multiple commands produce '/Users/isai/Library/Developer/Xcode/DerivedData/bwoae-civvqqnndameofcwxddefhbquxiy/Build/Intermediates.noindex/bwoae.build/Debug-iphonesimulator/bwoae.build/Objects-normal/arm64/ViewExtensions.stringsdata':
1) Target 'bwoae' (project 'bwoae') has compile command for Swift source files
2) Target 'bwoae' (project 'bwoae') has compile command for Swift source files
I checked my "Copy Bundle Resources" Section. I do not have a duplicate plist file.
I even tried deleting everything under "Copy Bundle Resources" .
I still have this error.
Can someone please shed some light here and help me get rid of this error ?
Thank You.

Getting "Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib" error

The problem occurred when I adding Nimble as a git submodule. I've fired an issue on Quick/Nimble, but the problem appears to be not likely a Nimble issue, it maybe rather an Xcode issue, thus I'm asking here.
I set up a simple project according to Nimble installation guid and it's on github now. Basically I created an xcworkspace and an xcodeproj (added to the workspace). Nimble is added as git submodule and subproject to the workspace. Then I added Nimble.framework to my test targets Build Phases and wrote some simple test code to see if Nimble was running.
And when I run the test, Xcode gave this error message:
2017-02-20 23:41:29.482 xctest[52165:616190] The bundle “MainProjTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2017-02-20 23:41:29.483 xctest[52165:616190] (dlopen_preflight(/Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/MainProjTests.xctest/MainProjTests): Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/Nimble.framework/Nimble
Reason: image not found)
Program ended with exit code: 82
I've tried some solution I found for similar problems and they didn't work:
setting Embed Asset Packs In Product Bundle to YES (tried for both main target and test target)
setting Always Embed Swift Standard Libraries to YES (tried for both main target and test target)
The issue is the run path for the dynamic library:
libswiftSwiftOnoneSupport.dylib
If this is not included in the app bundle after building your app you'll want to add it by including it in the Copy Files Build Phase. Another possible problem could be that it's run path is not correctly set ( which you'll need to set if not already ), or fix the rpath with install_name_tool.
↳ Run-Path Dependent Libraries

Xbuild can't recognize SignAndroidPackage when using bamboo

I am trying to create a .APK file in Bamboo using the xbuild executable in a command task. The way I thought it should work is like this:
CusomterApp.sln /t:SignAndroidPackage /p:Configuration=Release
This however when I run the build will give this error. Target named 'SignAndroidPackage' not found in the project. I have tried to build it without it but I am getting other errors instead. I have tried changing the order of it and changing the target but it doesn't seem to create the apk file doing this.
I have seen in another question that someone created an apk file using this(not on Bamboo):
xbuild $ANDROID_PROJECT_FILE /t:SignAndroidPackage /p:Configuration=Release
So I thought I should have no problems with using this on Bamboo but the executable doesn't seem to recognize the SignAndroidPackage and doesn't work, any ideas on how to fix this?
I create a .IPA file for an IPhone app using mdtool, with this command -v build -t:Build "c:Release|iPhone" CustomerApp.sln and this works fine for creating the .IPA file so I would have thought that the .APK would be fine too.
I think that the problem is to do with using the solution file for the Android apk file, The bamboo will create a solution folder which has both iOS and Android files in it. The iOS worked and built the IPA file when I used the CustomerApp.sln file. The apk file does not build when I use the CustomerApp.sln. If I use this CustomerApp.Droid/CustomerApp.Droid.csproj file I get a list of error's Are you missing an assembly reference?
When I was doing the IPA I got this error using the CustomerApp.iOS/CustomerApp.iOS.csproj file which I fixed by using the CustomerApp.sln file instead. How can I fix this as the whole folder contains information that is necessary for the creation of the APK file?
I have found a problem that when I try to build the apk file using this: /p:Configuration=Release CustomerApp.sln it gives me the error PCL assemblies not installed and it also has this warning : Unable to find framework corresponding to the target moniker '.NetPortable,Version=v4.5,Profile=Profile78'. Framework assembly references will be resolved from the GAC, which might not be the intended behaviour. I don't know why this is happening as I looked for the profile in the folder specified and it was there.
I had this problem before when trying to use xbuild to create the IPA file but then I used mdtool and it worked fine, I think I need to use xbuild to build the apk file but I can't see how to fix it. I also tried to run it in the terminal of the mac and I got the same error. Why is this happening?
The reason this happens is because you have to specify a .csproj, not a .sln. If you give it a solution file, you'll get an error complaining that it can't find the "SignAndroidPackage" target.

'hello/Hello.h' file not found - Trying to build/run iOS gomobile Hello app

I am building the gomobile Hello example app, but am running into the following problem: When trying to build and run the app after opening it in Xcode (7.1), I get the error 'hello/Hello.h' file not found'
From what I can tell, Hello.h is in fact in the hello folder of the native directory.
Following this discussion on Github, it seems like this is due to a recent change in the way Xcode 7 updates paths for the headers.
The proposed solution is to check Copy items if needed when importing the framework:
I can confirm that this fixes the issue. But note that you would then need to re-import the framework every time you make changes and build the go code.

Install Fragaria framework

I was looking for a way to implement syntax highlighting on my cocoa app and I found the great Fragaria framework https://github.com/mugginsoft/Fragaria. Unfortunately I seem to be unable to install the framework in my app.
Here are the steps I follow:
Compile the framework from the source code target
Add the framework to the "Link Binary with Libraries" build phase of XCode 4
Drag the framework into "Copy Bundle Resources"of build phase
Unfortunately when I try to build my app I get this error:
dyld: Library not loaded:
#executable_path/../Frameworks/MGSFragaria.framework/Versions/A/MGSFragaria
Referenced from:
/Users/dedalus/Developer/DEGS/trunk/build/Debug/DEGS.app/Contents/MacOS/DEGS
Reason: image not found
Which step am I missing?
Don't add the framework product to the Copy Bundle Resources build phase. Instead, create a new Copy Files build phase, set its destination to the Frameworks directory and add the framework build product to this phase. The Copy Bundle Resources build phase copies the framework to the resources subdirectory (Contents/Resources on OS X), but the dynamic linker expects it to be in the frameworks subdirectory (Contents/Frameworks on OS X). The newly added Copy Files build phase will put it there.
BTW, the error you're seeing is a run-time error, not a compile-time error. So strictly speaking you get this error when running the app, not when building it.

Resources