cef build from source : generate xcode project - macos

Background:
I followed the instructions provided here: https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
From the steps I could clone CEF,Chromium
and then build "Chromium Embedded Framework.framework"
and "CefClient.app" sample application as expected.
Note:
we donot intend to use binary distribution available from cefbuilds.com, since we intend to experiment/work within "Chromium Embedded Framework.framework" aswell.
Questions :
Is there a way to create an XCode project that we can use to work with the CefClient.app sample application source code ? (project can link to "Chromium Embedded Framework.framework")
If the above is not possible, Should I try to use the XCode.proj generated from a closest binary distribution and use it here - Is this valid ? Is there a better option ?

I was able to generate the XCode project by making a release distribution out of the build outputs that I generated earlier.
https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md#markdown-header-manual-packaging
Once a release distribution is created, XCode project can be created by running the command :
cmake -G "Xcode" -DPROJECT_ARCH="x86_64"
inside the release distribution directory.
Note:
I got this answer from CEF forum:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=14546

Related

Xamarin.UITest AppCenter Cannot find test-cloud.exe

I have created Xamarin.UITest that can run locally on my desktop. My goal is to execute these test as a part of a post-build script to run UITest after the app has built as mentioned in this article below:
https://tomsoderling.github.io/AppCenter-Automated-UI-tests-on-build/
Below is my script
appcenter test run uitest --app "MY-APP" --devices 168683d9 --app-path $APPCENTER_OUTPUT_DIRECTORY/MyApp.Mobile.Droid.apk --test-series "myapp-mobile-test" --locale "en_US" --build-dir $APPCENTER_SOURCE_DIRECTORY/MyApp.Mobile.UITests/bin/Release --token MY-TOKEN --uitest-tools-dir $APPCENTER_SOURCE_DIRECTORY/packages/Xamarin.UITest.*/tools
When the script above is apart of my appcenter post build script, I get the following error:
Error: Cannot find test-cloud.exe, the path specified by "--uitest-tools-dir" was not found.
Please check that "/Users/vsts/agent/2.141.1/work/1/s/packages/Xamarin.UITest.2.2.6/tools" is a valid directory and contains test-cloud.exe.
Minimum required version is "2.2.0".
I think a lot of people are having trouble dealing with this actually and I know it has something to do with --uitest-tools-dir OR --build-dir variables.
Keep in mind this I am first trying to do this with Xamarin.Android, if successful I will try the Xamarin.iOS
One clue i do see is when Tom says "I had to chose to build the app solution file in my App Center CI build - not simply the iOS project like I normally would" in the noted article, but I am not quite sure how to do that or if is connected to why AppCenter cannot locate my test-cloud.exe I will also say that test-cloud.exe somehow comes from the Xamarin.UITest nuget, but I do not see any test-cloud.exe file in my Xamarin.Forms project.
This answer works, but it's pretty fragile.
The test-cloud.exe can't be located at packages/Xamarin.UITest.2.X.X/tools in projects that uses the old project structure (projects that use packages.config). For new projects (new .csproj formats), there is no such file in the path of the project. The only way I found to make it work on AppCenter is to use it from the NuGet package cache (/Users/vsts/.nuget/packages/xamarin.uitest/2.X.X)
Kudos to AppCenter Agents for helping me to resolve this. 2 things were required as indicated below:
Agent Anvesh says
Hi there, Thanks for the details, So seems like you are using a nuget as a PackageReference in your project(this means that there will be no package folder in your project, packages will be there at user profile).
So when you are trying to run the test as part of the app center build. Then in the shell script used the --uitest-tools-dir value as below
/Users/vsts/.nuget/packages/xamarin.uitest/2.2.6/lib/tools
So I modified my above script to add the below:
--uitest-tools-dir /Users/vsts/.nuget/packages/xamarin.uitest/2.2.6/tools \
Agent Shawn says
So I added the below
msbuild $APPCENTER_SOURCE_DIRECTORY/MyApp.Mobile.UITestProject.csproj

How can I validate dsym file of xcode build?

I extract Dsym file from the xarchive of release version and uploaded on crittercism but not able to find the symbolic crash report from the tool.
I contact crittercism helpDesk and all I come to know that I need to upload dsym file with all symbols... so, how can I validate that the file which I'm uploading is valid or not?
Build setting : GCC_GENERATE_DEBUGGING_SYMBOLS : Yes
File extract step : organizer > xarchive > release build > show package contents > dsyms > dsym.file
Apteligent also provides an automatic way using which, you'll never have to worry about tracking down your dSYMs again. This can be achieved by uploading the build_script file which is available inside the Apteligent iOS library (v4.0.1 and higher). All you need to do is specify the APP ID, API Key and the source path in order to configure your Xcode. Refer to the following article for complete description :
http://support.crittercism.com/articles/knowledge_base/Uploading-dSYMs-to-Apteligent-automatically
Once done, whenever you build your Xcode application, the dSYM files for your application (and any dependent modules to which you added the Run Script) will be uploaded to Apteligent and become available for crash symbolication.

MBProgressHud Swift Compile Error when Archiving

I already finished my project, it works and runs perfectly on the simulator or in my own device. When I select to Archive the project to upload de build to Itunes Connect, I get all these compile errors
"Use of undeclared type MBProgressHUD"
"Use of unresolved identifier MPProgressHUD"
And so on..
NOTE: I'm using CocoaPods for this library
What solved it for me was adding import MBProgressHUD in the classes where I use this library, not only in the Bridge-Header.h
Navigate to your project build settings and find the “Swift Compiler – Code Generation” section (You may find it faster to type in “Swift Compiler” into the search box to narrow down the results)
Next to “Objective-C Bridging Header” you will need to add the name/path of your header file. If your file resides in your project’s root folder simply put the name of the header file there. Examples: “ProjectName/ProjectName-Bridging-Header.h” or simply “ProjectName-Bridging-Header.h”.
Refer this link http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/
Welcome to Cocoapods Hell (a.k.a. : where the magic ends), where one must dive into his project build settings and make sense of what went wrong...
It's very hard to answer to you, as any number of reasons might be causing that.
Do you use the same target for Build / Run & Archive ? It might be because your libPods.a isn't copied into your Archive target
Have you installed Pods using pod install , have you tried playing that command again. (yes, faced with magic going wrong, one can sometimes rely on magic to save him again)
'Build' and 'Archive' product often differ in the build configuration they use (Build most of the time uses 'debug' configuration, while Archive uses 'release' configuration... ). Check your Pods configuration files (debug/release) and make sure they both include your MBProgressHud. Also, in your Project 'Info', check which pods Xcode configuration files are selected for 'debug' and 'release'
Good luck !
(PS : as MBProgressHud is a single file, and one you can often change, another solution is to get rid of Cocoapods and just copy/paste it)

xcode distributing application with 2 project

i have a problem to distributing application with 2 project (one project with sub-project include inside). When i try to make as usual "archive", i'm not able to send application.
Could someone help me?
Regards
I'm guessing the sub-project is a library? And when you do Build > Archive you get an .xcarchive file instead of a .ipa? If so, you need to set the Skip Install flag to No on your library (see this answer), then Build > Archive will generate a .ipa file.
The reason this is happening is because you have two projects.
For the sub-project you need to edit the Target > Build Settings and set the Skip Install setting to Yes.
Afterwards the "Archive" action will work as usual.

What javac is Netbeans using?

My work project needs to be compiled and run under JDK1.5 and I'm on a Mac. I followed the instructions here to get 1.5 back on Snow Leopard, and it works fine when building from IntelliJ IDEA, or if I'm just in the same directory as the build.xml and try "ant CleanRebuild" When I "Run Target" in NetBeans they're all compiled with the wrong version resulting in
java.lang.UnsupportedClassVersionError:
Bad version number in .class file
(unable to load class...
when tomcat is trying to start up.
So things I've tried
Set the "Java Platform" to 1.5 under the project properties/libraries.
Set the Source/Binary Format to JDK 5 under project properties/sources.
Pointed the ant home to the ant I'm using under preferences/ant
Renaming every javac executable I could find in the hopes NetBeans would fail to compile and I could figure out which one it was using (no luck)
Setting 1.5 as the default, resulting in the need to point $netbeans_jdkhome to the 1.6 jdk in order for NetBeans to even start.
All unsuccessful....
Again, if I cd into the directory of the netbeans project with the build.xml and run the command manually all is well....so NetBeans. What's the deal?
Revised answer
Assumptions: NetBeans version 6.9.1 (although likely applicable to most or all 6.x versions), alternative build systems (e.g., Maven) are not used...the default (Ant) is used.
NetBeans, by default, uses Ant as its build system for doing things like compiling a project, building a project, cleaning built files from a project, etc. Ant has two concepts that are applicable here: targets and tasks. A target, in Ant's vocabulary, is simply a "command" or a series of jobs that need to be completed for a particular job. In NetBeans, common targets are "Compile", "Build", "Clean and Build", etc. The "jobs" that a target completes are (among other things) Ant tasks. In NetBeans one task (which is particularly relevant in answering this question) is the Javac Task. This is the task that Ant uses to compile .java files into .class files.
An Ant-based project, and therefore a NetBeans project, uses the file build.xml to control the build process and tell Ant how to go about accomplishing the targets. In a NetBeans project, the build.xml is found in the root directory of the project, by default. NetBeans, however, uses a user-extensible build.xml file. The core targets and tasks defined by NetBeans are actually located in nbprojects/build-impl.xml and imported into build.xml within the first few lines of the file. The theory is that users can add or override things in build.xml while the core NetBeans-defined configuration remains untouched in the build-impl.xml file.
If you look in the default nbproject/build-impl.xml file for a NetBeans Java project, you will find the Javac task referred to twice. (Search for "<javac".) Both are in macro definitions, and therefore deep within the complexities of NetBean's default build configuration. If we refer to the Javac Task documentation we find that the tasks uses the compiler in the location specified either by the global build.compiler property, by the compiler attribute specified with the <javac... /> task, or the default which is the Java compiler that is used when running and, and thus the one that is used when running NetBeans (because it is what fires off the Ant process). Since we don't see build.compiler or the compiler attribute anywhere (in the default build-impl.xml), then we can only conclude that the default is being used.
So here we have the (more-or-less correct) first answer. NetBeans compiles using the JDK that was used to execute NetBeans by default. It looks like it is actually a bit more complicated than that simple answer, but it is essentially correct. If you look at the documentation for the Javac Task it alludes to "a class that implements the CompilerAdapter interface", which suggests that rather than calling the javac executable directly, Ant (and therefore NetBeans) compiles using the compiler class (that, in all likelihood, the javac executable also uses). Refer to the Original answer below to determine which JDK what used to run NetBeans.
So, what if you don't want to use the default JDK that was used to run NetBeans? This is where "Java Platforms" comes in. Go to the Tools menu, and click on "Java Platforms". You likely only have one platform defined here. (As an aside, this is actually the most correct answer to what JDK is used by default... the one defined here in the Java Platform Manager.) If you would like to compile against another Java version (say your default JDK is 1.6, but you want to compile against 1.5) then you would install the alternate JDK somewhere on your system, and then configure a platform here in NetBeans' Java Platform Manager. (I'll leave it as an exercise for you to find the documentation on how to add a Java Platform. A superficial search of the wiki didn't turn up anything obvious. In any case, it's fairly self-explanatory.)
Once a new platform is created in the manager, you would right-click on your project in the Projects tab, click on "Properties", and then on "Libraries". At the top, you would select the appropriate Java platform for the project. As soon as you change this value and click on "OK", NetBeans makes several adjustments to your build-impl.xml file that point it to the new JDK against which to compile. (It is instructive for the truly geeky amongst us to make a copy of the nbproject directory before making this change and to diff that against the new contents of the nbproject directory after the change is made.) The changes instruct the Javac Ant Task to use the (equivalent of the) javac executable of the specified platform. So here we have the most correct answer: NetBeans uses the equivalent of the javac executable (as invoked by the Ant javac task) that is specified in the project's Java Platform located under the Libraries node of the project's properties.
Original answer
The path to the JDK used by NetBeans can be found in the netbeans.conf file. Look for the netbeans_jdkhome entry.
You can also specify the jdkhome at runtime (*NIX example given):
netbeans --jdkhome /usr/bin/jdk1.6.0_22
The netbeans.conf file is found in different places depending on what OS you are using. See the NetBeans.conf FAQ on the NetBeans wiki for help finding the file.
A few additional comments...
...You can specify the -target option in the project properties. In NetBeans 6.9 right-click on the project, and choose Properties. Click on the Compiling node. Add your -target to Additional Compiler Options.
...I have read in a few places that specifying a target is not a guarantee that the code will run on a JRE whose version is lower than the JDK that built it. In other words, the recommendation seems to be that if you want 1.5 binaries, then compile with the 1.5 JDK.

Resources