Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Setup] Initialize the project file #1

Merged
merged 60 commits into from
Apr 22, 2022
Merged

Conversation

yo1995
Copy link
Collaborator

@yo1995 yo1995 commented Apr 1, 2022

This PR initialize the project from a multiplatform app template created in Xcode Version 13.3 (13E113).

Notes:

  • The project file is configured with Xcode 12.0-compatible (objectVersion = 54) project format, rather than the newest Xcode 13 format, due to Apple's new way of handling Info.plist. ref Edit: the project file is now Xcode 13.0-compatible (objectVersion = 55), with Info.plist auto generation disabled.
  • The project uses masquerade mechanism which is also in current iOS SV, see New: Adding API keys with "masquerade" mechanism arcgis-runtime-samples-ios#1013 . A new placeholder API key for macOS sample viewer is included in the masque file
    • Please ping me on Slack to get the .secrets file
  • gitignore, swiftlint configs are largely the same as before
  • AppIcons are identical to current iOS SV
  • To verify the app builds successfully with Swift SDK, I added a MapView to ContentView. Later on it will be removed
  • The project is configured with local Swift package. Download the Swift API daily build and put it under Sources/Swift - until we release the Swift API to public, local SP will be the primary way for development Edit: according to suggestions below, the project is now manually configured with the Swift API source code
    image
  • The @main entry file is renamed as AppMain.swift
  • Build Options -> Enable Previews is disabled (default) for both iOS and macOS targets. If needed we can add it back later on. For now I won't create preview for the main app logic UI or samples to facilitate development

@yo1995 yo1995 self-assigned this Apr 1, 2022
@yo1995 yo1995 requested a review from dg0yal April 7, 2022 21:37
@zkline101
Copy link
Contributor

The project is configured with local Swift package. Download the Swift API daily build and put it under Sources/Swift - until we release the Swift API to public, local SP will be the primary way for development

I think it would be nice to have the Swift API added manually to the sample view for development.
For a couple of reasons:

  • Anybody that already has the swift repo cloned and built can quickly switch over to sample viewer without any extra steps. This also results in being able to use the latest Swift API quicker rather than waiting for the next daily build or adding the Swift API manually ourselves.
  • It would be easier to debug any issues in the Swift API found in the sample viewer

@philium
Copy link
Contributor

philium commented Apr 12, 2022

  • The project file is configured with Xcode 12.0-compatible (objectVersion = 54) project format, rather than the newest Xcode 13 format, due to Apple's new way of handling Info.plist. ref

I don't understand. What's the problem with the new format? As far as we know, it is here to stay, so using an older project version is just delaying the inevitable. And since the minimum required Xcode version is going to be at least 13.0, it will never be opened in Xcode 12. Could we embrace that change instead? By the way, as part of this PR, could you please update the README with a requirements section and also instructions to build?

Copy link
Member

@mhdostal mhdostal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yo1995 I'm very excited to see this started! I agree with @zkline101 and @philium, that the sample viewer point to the local version of the Swift API. This is what the Toolkit does and it makes it very easy to build (and debug) using the latest version. Also, embracing the Xcode 13 project format just makes sense, even though it is a bit of a hassle ATM.

Nice work!

@yo1995 yo1995 removed the request for review from dg0yal April 12, 2022 22:10
@yo1995
Copy link
Collaborator Author

yo1995 commented Apr 20, 2022

Feel free to take another look. A few updates after I address the suggestions above:

  • The project file is now under the root folder of the repo, and renamed to Samples.xcodeproj.
  • macOS target and scheme are removed, but the project structure from Multiplatform template is retained. So that in the future if we add macOS back, it will conform to the Apple's multi-platform app template.
  • I stayed with GENERATE_INFOPLIST_FILE = fasle and want to use the old Info.plist way to manage custom properties.
  • 76x76 AppIcon is removed because it isn't needed

@yo1995 yo1995 requested review from philium and mhdostal April 20, 2022 21:48
Samples.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
Samples.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
Shared/AppSecrets.swift.masque Outdated Show resolved Hide resolved
Shared/SamplesApp.swift Outdated Show resolved Hide resolved
@yo1995 yo1995 requested a review from philium April 21, 2022 20:50
Copy link
Contributor

@philium philium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you so much.

@yo1995 yo1995 merged commit 65a1909 into v.next Apr 22, 2022
@yo1995 yo1995 deleted the Ting/New-ProjectSetup-vNext branch April 22, 2022 21:17
@yo1995 yo1995 moved this from In progress to Done in SwiftUI Sample Viewer prototyping Apr 23, 2022
@yo1995
Copy link
Collaborator Author

yo1995 commented May 16, 2022

I think it would be nice to have the Swift API added manually to the sample view for development. For a couple of reasons:

  • Anybody that already has the swift repo cloned and built can quickly switch over to sample viewer without any extra steps. This also results in being able to use the latest Swift API quicker rather than waiting for the next daily build or adding the Swift API manually ourselves.
  • It would be easier to debug any issues in the Swift API found in the sample viewer

@mhdostal @zkline101 @philium (@dfeinzimer) During today's cocoa scrum Ryan raised a good point - it may be a hassle for intern Chris to set up runtime/swift and core dependencies. While I'm happy to keep what we use right now (local source code dependency), I'll set up a PR to change it back to Swift API daily build binary package after #3 and #4 get merged. We can have more discussion in that PR if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants