apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

doc: readme improvements (cleaup, xcode debugging, etc) #1133

Closed ath0mas closed 3 years ago

ath0mas commented 3 years ago

Platforms affected

iOS

Motivation and Context

Reviewing Readme between cordova-ios and cordova-android.

Description

Fix typo and add "Debugging in Xcode".

(also see similar PR for cordova-android apache/cordova-android#1308)

Testing

.

Checklist

ath0mas commented 3 years ago

I just applied the same changes suggested and merged by @erisu in linked PR for cdv-android.

Ready for review!

codecov-commenter commented 3 years ago

Codecov Report

Merging #1133 (1a5a583) into master (7a4f7c3) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1133   +/-   ##
=======================================
  Coverage   74.86%   74.86%           
=======================================
  Files          13       13           
  Lines        1723     1723           
=======================================
  Hits         1290     1290           
  Misses        433      433           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7a4f7c3...1a5a583. Read the comment docs.

erisu commented 3 years ago

As for @NiklasMerz comment

You can also open the PROJECTNAME.xcodeproj or `PROJECTNAME.xcodeworkspace files in the platforms folder.

IMO, if you want to add this to the README, only suggest opening the xcodeworkspace and not mention the option for xcodeproj.

If my memory is correct, there were issues in the past when opening xcodeproj. E.g. within XCode the CordovaLib might not have loaded and there were reference issues. But right now it seems OK...

NiklasMerz commented 3 years ago

@erisu I agree. I have used both with no issues so far but we should only recommend the workspace.

erisu commented 3 years ago

OK, I have remembered it now and confirmed,

If a user is installing a plugin that uses Pods, opening the xcodeproj will not load the Pods as it is a separate project. And then, the code that imports the pods will fail and leads to build failures.

If the project contains Pods, the users should open xcworkspace.

This is why I always suggested to people to open the xcworkspace. xcworkspace works for all cases.

If we mentioned anything about xcodeproj, it could lead to confusion.

If anything is mentioned, just the xcworkspace is fine.

Here is also an example screenshot of the XCode project navigator to show the difference.

xcworkspace xcodeproj
xcworkspace xcodeproj