Skip to content

mtecnic/Cbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

WordPress iOS App

A simple iOS application that displays your WordPress website in a native WebView.

Features

  • Full WordPress site display in native iOS app
  • Native navigation with back/forward gestures
  • Loading indicator
  • Error handling
  • Support for both portrait and landscape orientations
  • Works on both iPhone and iPad

Project Structure

WordPressApp/
├── WordPressApp.xcodeproj/     # Xcode project files
└── WordPressApp/               # Source code
    ├── WordPressAppApp.swift   # App entry point
    ├── ContentView.swift       # Main view
    ├── WebView.swift           # WebView wrapper
    ├── Config.swift            # Configuration (WordPress URL)
    ├── Info.plist              # App configuration
    └── Assets.xcassets/        # App assets

Setup Instructions

1. Configure Your WordPress URL

Open WordPressApp/WordPressApp/Config.swift and replace the placeholder URL with your WordPress site URL:

static let wordPressURL = "https://your-wordpress-site.com"

2. Open in Xcode

  1. Make sure you have Xcode installed (version 15.0 or later recommended)
  2. Open WordPressApp.xcodeproj in Xcode
  3. Select your development team in the project settings:
    • Select the project in the navigator
    • Go to "Signing & Capabilities"
    • Select your team from the dropdown

3. Build and Run

  1. Select a simulator or your connected iOS device
  2. Click the Run button (or press Cmd+R)
  3. The app will build and launch, displaying your WordPress site

Requirements

  • iOS 15.0 or later
  • Xcode 15.0 or later
  • A valid Apple Developer account (for running on physical devices)

Customization

Change App Name

Edit the CFBundleDisplayName in WordPressApp/WordPressApp/Info.plist

Change Bundle Identifier

  1. Open the project in Xcode
  2. Select the project in the navigator
  3. Under "General" > "Identity", change the "Bundle Identifier"

Add App Icon

  1. Prepare app icons in the required sizes (1024x1024 for App Store)
  2. Open Assets.xcassets in Xcode
  3. Drag your icon images into the AppIcon asset

Network Security

The app is configured to allow arbitrary loads (NSAllowsArbitraryLoads = true in Info.plist). This allows loading both HTTP and HTTPS content. For production apps, you should:

  1. Use HTTPS for your WordPress site
  2. Configure App Transport Security properly
  3. Remove or restrict NSAllowsArbitraryLoads

Troubleshooting

White Screen or Loading Issues

  • Verify your WordPress URL is correct in Config.swift
  • Check that your site is accessible from a browser
  • Ensure you have internet connectivity

Build Errors

  • Make sure you have selected a development team
  • Clean the build folder (Product > Clean Build Folder)
  • Restart Xcode

Signing Issues

  • You need a valid Apple Developer account to run on physical devices
  • Simulators don't require signing

Next Steps

Consider adding these features:

  1. Pull-to-refresh functionality
  2. Share button to share content
  3. Custom navigation controls
  4. Offline mode with caching
  5. Push notifications integration
  6. Custom styling to match your WordPress theme
  7. Deep linking support

License

This project is provided as-is for personal or commercial use.

About

mirror

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages